<!DOCTYPE html>
<head>
	<title>Twitter Player</title>
	<link type="text/css" rel="stylesheet" media="screen" href="/system/application/views/css/all.css" />
</head>
<body>

<h1>Twitter player!</h1>

<?php 
//var_dump($_ci_vars);
//var_dump($user);
// if no user errors
if(!isset($user['error'])){
?>
	<p>Yay, you are logged in!</p>
	<p><a href="/index.php?c=welcome&amp;m=index&amp;clear=true">Log out of application</a></p>
	<p>Sreen name:<?php echo $user['screen_name'];?></p>
	<p>Your last tweet<?php echo $user['status']['text'];?></p>
	<?php var_dump($user); ?>

<?php	
}else{
	echo "<p>".$user['error']."</p>";
	if($requestUrl){
	print <<<HTML
		<p><a href="{$requestUrl}" id="signInWithTwitter">Sign in with Twitter</a></p>
HTML;
}
}
?>


<?php 
echo form_open('welcome/getFollowers',array('id'=>'submitTwitterName'));
echo form_input('twitterUsername'); 
echo form_button(array('type'=>'submit','value'=>'Submit','content'=>'Start playing'));
echo form_close();
?>
<p><br />Page rendered in {elapsed_time} seconds</p>

</body>
</html>
